import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
//import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 只导入实际使用的图标
import { Moon, Sunny, User, Lock } from '@element-plus/icons-vue';
//参考https://element-plus.org/zh-CN/guide/dark-mode
import 'element-plus/theme-chalk/dark/css-vars.css';
import './assets/styles/dark/css-vars.css';

const app = createApp(App);

// 注册所有图标
/*for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}*/
// 注册实际使用的图标
app.component('Moon', Moon);
app.component('Sunny', Sunny);
app.component('User', User);
app.component('Lock', Lock);

app.use(router);
app.use(ElementPlus);

app.mount('#app');
